package com.gomyb.result;

import lombok.Getter;
import lombok.Setter;

/**
 * @author <a href="mailto:HelloHeSir@gmail.com">Mr_He</a>
 */
@Getter
@Setter
class OKResult extends Result {

    private int code = 0;

    OKResult() {
    }

    OKResult(Object data) {
        this.data = data;
    }

    OKResult(String msg, Object data) {
        this.msg = msg;
        this.data = data;
    }

    public OKResult setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public OKResult setData(Object data) {
        this.data = data;
        return this;
    }

    public OKResult setCode(int code) {
        this.code = code;
        return this;
    }
}